@if (count($enabledFilters))
    <div
        class="col-md-12 d-flex table-responsive mt-1"
    >
        @if (count($enabledFilters) > 1)
            <div
                wire:click.prevent="clearAllFilters()"
                class="pe-1"
                role="button"
            >
                <span
                    class="badge bg-secondary">{{ trans('livewire-powergrid::datatable.buttons.clear_all_filters') }}
                    <svg
                        width="10"
                        stroke="currentColor"
                        fill="none"
                        viewBox="0 0 8 8"
                    >
                        <path
                            stroke-linecap="round"
                            stroke-width="1.5"
                            d="M1 1l6 6m0-6L1 7"
                        />
                    </svg>
                </span>
            </div>
        @endif
        @foreach ($enabledFilters as $filter)
            @isset($filter['label'])
                <div
                    wire:click.prevent="clearFilter('{{ $filter['field'] }}')"
                    class="pe-1"
                    role="button"
                >
                    <span class="badge text-bg-light">{{ $filter['label'] }}
                        <svg
                            width="10"
                            stroke="currentColor"
                            fill="none"
                            viewBox="0 0 8 8"
                        >
                            <path
                                stroke-linecap="round"
                                stroke-width="1.5"
                                d="M1 1l6 6m0-6L1 7"
                            />
                        </svg>
                    </span>
                </div>
            @endisset
        @endforeach
    </div>
@endif
